package com.example.kiratest.realize.pojo;
import jakarta.validation.constraints.*;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 业务配单表 新建表单
 *
 * @Author jyken
 * @Date 2024-12-06 15:06:08
 * @Copyright 1
 */

@Data
public class TradeAddForm {

    //@Schema(description = "业务配单表id")
    //private Long tradeId;

    /**
     * 设备组id
     */

    private Long groupId;


    @NotNull(message = "业务单offerId 不能为空")
    private Long offerId;



    @NotNull(message = "业务单渠道id 不能为空")
    private Long affiliateId;


    @CheckEnum(value = TradeStatusEnum.class, message = "业务单状态:[1:active,2:pending,3:paused]", required = true)
    private Integer tradeStatus;

      @NotNull(message = "业务单绑定时区。目的：1用于留存生成时间节点 2用于install锁cap判断  不能为空")
    private Integer timezone;

    @NotNull(message = "业务单cap 不能为空")
    private Integer cap;

    @NotBlank(message = "大写国家二字码,预留三位 不能为空")
    @Pattern(regexp = "^[a-zA-Z]+$", message = "请输入大写国家二字码")
    private String country;

    @NotBlank(message = "应用包名 不能为空")
    private String packageName;

    @NotNull(message = "预估cvr(1-100),用于install任务生成 不能为空")
    @Max(value = 100, message = "预估CVR最高值为100")
    @Min(value = 1, message = "预估CVR最低值为1")
    private Integer estimateCvr;

    @NotBlank(message = "install任务每小时生成权重 不能为空")
    private String hourInstallWeight;

    @NotNull(message = "代理服务商类型 1：roxlabs 2:ipidea 不能为空")
    private Integer proxy;

    @NotNull(message = "脚本表id 不能为空")
    private Long scriptId;

    @NotNull(message = "apk表id 不能为空")
    private Long apkId;

    @NotBlank(message = "留存策略，填写规则：逗号分割的小数比例 eg:0.6,0.52,0.5 即代表做三天留存，留存比例依次为 0.6 052 0.5 不能为空")
    private String retentionStrategy;

    @NotNull(message = "install任务脚本时长 不能为空")
    private Integer installDuration;

   @NotNull(message = "留存任务脚本时长 不能为空")
    private Integer retentionDuration;

    @NotNull(message = "install任务广告观看数 不能为空")
    private Integer installAdsNum;

   @NotNull(message = "留存任务广告观看数 不能为空")
    private Integer retentionAdsNum;


    private LocalDateTime updateTime;


    private LocalDateTime createTime;


    private Integer deletedFlag;

    private Integer bussinessType;

}